package hou;

public class Test08 {
    public static void main(String[] args) throws ClassNotFoundException {
        //获取系统类加载器
        ClassLoader classLoader = ClassLoader.getSystemClassLoader();
        System.out.println(classLoader);

        //获取系统加载器的父类-->扩展加载器
        ClassLoader classLoader1 = classLoader.getParent();
        System.out.println(classLoader1);

        //获取扩展加载器的父类-->根加载器
        ClassLoader classLoader2 = classLoader1.getParent();
        System.out.println(classLoader2);

        //系统类加载器
        System.out.println(Class.forName("hou.Test08").getClassLoader());
        //根加载器
        System.out.println(Class.forName("java.lang.Object").getClassLoader());
    }
}
